package com.zhanghe.study.springboot.controller.securityanno;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zh
 * @date 2021/8/11 11:04
 */
@RestController
@RequestMapping("/preAuthorizeAnno")
public class TestPreAuthorizeController {

    @RequestMapping("/preAuthorize")
//    @PreAuthorize("hasAuthority('admin')")  // 方法进入前进行校验
    public String test(){
        System.out.println("preAuthorize");
        return "test";
    }
}
